import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token' // 设置一个独一无二的key
const timeKy = 'hrsass-timestamp-key' // 设置一个独一无二的key

export function getTokenCookie () {
  return Cookies.get(TokenKey)
}

export function setTokenCookie (token) {
  return Cookies.set(TokenKey, token)
}

export function removeTokenCookie () {
  return Cookies.remove(TokenKey)
}

// 获取时间戳
export function getTimeStampCookie () {
  return Cookies.get(timeKy)
}
// 读取时间戳
export function setTimeStampCookie () {
  Cookies.set(timeKy, Date.now())
}
